<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>科室管理</title>
<%@include file="/head.jsp"%>
<script src="jsp/system/Department/index.js" type="text/javascript"></script>
</head>
<body class="easyui-layout">
		<div region="west" id="index_west" class="easyui-panel" title="部门管理" border="false" style="width:160px;">
			<div id="dept-tree-div" style="padding: 5px;">
				<ul id="dept-tree"></ul>
			</div>
		</div>
	<div id="index_center" region="center" title="部门管理">
		<div class="tool-bar">
				<a class="easyui-linkbutton" iconCls="icon-add" plain="true" href="javascript:void(0);" onclick="btn_add();">添加</a>
				<a class="easyui-linkbutton" iconCls="icon-edit" plain="true" href="javascript:void(0);" onclick="btn_edit();">修改</a>
				<a class="easyui-linkbutton" iconCls="icon-delete" plain="true" href="javascript:void(0);" onclick="btn_delete();">删除</a>
		</div>
		<div class="context">
			<div style="height: 100%;" >
				<table class="easyui-simplegrid" tmpl="#template" pager="#pager" style="width: 800px;">
					<thead class="datagrid-header">
						<tr>
							<th style="width: 30px;"><input type="checkbox" onclick="$('.easyui-simplegrid').simplegrid('selectAll', this.checked);" /></th>
							<th align="center" class="grid-cell">科室名称</th>
							<th align="center" class="grid-cell">上级科室</th>
							<th align="center" class="grid-cell">所属医院</th>
							<th align="center" class="grid-cell">存在子集</th>
							<th align="center" class="grid-cell">绑定关联</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
			<!-- 分页 -->
			<div id="pager" class="pager"></div>
			<script id="template" type="text/x-jquery-tmpl">
				<tr>
					<td name="bh" value="{{= bh}}"><input type="checkbox"/></td>
					<td name="mingc" align="center" class="grid-cell">{{= mingc}}</td>
					<td name="suos" value="{{= suos}}" align="center" class="grid-cell">{{= suosmc}}</td>
					<td name="yiybh" value="{{= yiybh}}" align="center" class="grid-cell">{{= yiymc}}</td>
					<td name="haschildren" value="{{= haschildren}}" align="center" class="grid-cell">{{= haschildren > 0 ? '是' : '否'}}</td>
					<td name="hasgroup" value="{{= hasgroup}}" align="center" class="grid-cell">{{= hasgroup > 0 ? '是' : '否'}}</td>
				</tr>
			</script>
		</div>
	</div>

	<div id="department-div" class="easyui-window" modal="true" closed="true" resizable="false" minimizable="false" maximizable="false" collapsible="false" iconcls="icon-add" style="width: 350px; height: 230px; padding: 5px;">
		<form id="department-form">
			<input name="department.bh" type="hidden" value="" />
			<input id="suos" name="department.suos" type="hidden" value="" />
			<input id="yiybh" name="department.yiybh" type="hidden" value="" />
			<input id="cengc" name="department.cengc" type="hidden" value="" />
			<table width="100%" class="table">
				<tr>
					<td width="40%">科室名称:</td>
					<td width="60%"><input name="department.mingc" type="text" /></td>
				</tr>
				<tr>
					<td colspan="2">
						<button id="department-button" type="button">提交</button>
						&nbsp;&nbsp;&nbsp;&nbsp;
						<button type="button" onclick="$('#department-div').window('close');$('#department-form')[0].reset();">取消</button>
					</td>
				</tr>
			</table>
		</form>
	</div>

</body>
</html>
